<template>
  <!-- 详情 -->
  <el-dialog title="跨境通关费用预估详情" :visible.sync="dialogVisible" width="50%" append-to-body
             :close-on-click-modal="false" :before-close="closedialog">
    <el-descriptions :column="2" border>
      <el-descriptions-item>
        <template slot="label">
          通关业务类型
        </template>
        <dict-tag :options="dict.type.sys_bill_business_type" :value="form.businessType"/>
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          收费项目
        </template>
        {{ form.chargeContent }}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          附件
        </template>
        {{ form.fileUrl }}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          跨境通关费用预估状态
        </template>
        <dict-tag :options="dict.type.start_stop_status" :value="form.status"/>
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          点击量
        </template>
        {{ form.clicks }}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          创建者
        </template>
        {{ form.createBy }}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          创建时间
        </template>
        {{ form.createTime }}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          更新者
        </template>
        {{ form.updateBy }}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          更新时间
        </template>
        {{ form.updateTime }}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          备注
        </template>
        {{ form.remark }}
      </el-descriptions-item>
    </el-descriptions>
    <div slot="footer" class="dialog-footer" style="text-align: center;">
      <el-button @click="closedialog">关闭</el-button>
    </div>
  </el-dialog>
</template>

<script>
import {getFeeEstimate} from "@/api/miniapp/feeEstimate";

export default {
  props: {
    dict: {}
  },
  data() {
    return {
      //显示详情
      dialogVisible: false,
      form: {
        id: null,
        businessType: null,
        chargeContent: null,
        fileUrl: null,
        status: "0",
        clicks: null,
        createBy: null,
        createTime: null,
        updateBy: null,
        updateTime: null,
        remark: null
      }
    }
  },
  methods: {
    open(row) {
      this.dialogVisible = true;
      this.loadDetail(row);
    },
    closedialog() {
      this.dialogVisible = false
    },
    // 获取详情
    loadDetail(row) {
      getFeeEstimate(row.id).then((res) => {
        if (res.code == 200) {
          this.form = res.data;
        }
      });
    },
  }
};
</script>

<style>

</style>
